package com.spa.infrastructure.service.douyin.result.web;

import lombok.Builder;
import lombok.Data;

import java.util.List;

@Data
@Builder
public class VideoListResult {

    private VideoData data;

    private Extra extra;

    @Data
    public static class VideoData {

        //用于下一页请求的cursor
        private long cursor;

        private int error_code;

        private boolean has_more;

        private String description;

        private List<Video> list;

    }

    @Data
    public static class Video {

        //视频封面
        private String cover;

        //视频创建时间戳
        private long create_time;

        //表示是否审核结束。审核通过或者失败都会返回true，审核中返回false。
        private Boolean is_reviewed;

        //是否置顶
        private Boolean is_top;

        //视频id
        private String item_id;

        //视频播放页面。视频播放页可能会失效，请在观看视频前调用/video/data/获取最新的播放页。
        private String share_url;

        //视频标题
        private String title;

        //表示视频状态。1:细化为5、6、7三种状态;2:不适宜公开;4:审核中;5:公开视频;6:好友可见;7:私密视频
        private int video_status;

        //媒体类型。2：图集;4：视频
        private int media_type;

        //视频真实id
        private String video_id;

        //统计数据
        private Statistics statistics;

    }

    @Data
    private static class Statistics {

        //评论数
        private int comment_count;

        //点赞数
        private int digg_count;

        //下载数
        private int download_count;

        //转发数
        private int forward_count;

        //播放数，只有作者本人可见。公开视频设为私密后，播放数也会返回0。
        private int play_count;

        //分享数
        private int share_count;

    }

    @Data
    private static class Extra {

        private int error_code;

        private int sub_error_code;

        private long now;

        private String description;

        private String sub_description;

        private String logid;

    }
}
